import {
	request,
	retryableRequest
} from '@/common/request';

export const loginApi = {
	/**
	 * 获取验证码 @author 卓大
	 */
	getCaptcha: (data) => {
		return request({
			url: '/b-auth/auth/generate/captcha',
			method: 'POST',
			data
		})
	},

	/**
	 * 登录 @author 卓大
	 */
	login: (data) => {
		return request({
			url: '/b-auth/auth/login',
			method: 'POST',
			data
		})
	},

	/**
	 * 退出登录 @author 卓大
	 */
	logout: (data) => {
		return request({
			url: '/b-auth/auth/logout',
			method: 'POST',
			data
		})
	},

	/**
	 * 获取登录信息 @author 卓大
	 */
	getLoginInfo: (data) => {
		return request({
			url: '/b-auth/auth/get_login',
			method: 'POST',
			data
		})
	},

	/**
	 * 获取短信验证码
	 */
	getSmsCode: (data) => {
		return request({
			url: '/b-auth/auth/sms/send',
			method: 'POST',
			data
		})
	},

	/**
	 * 验证短信验证码
	 */
	verifySmsCode: (data) => {
		return request({
			url: '/b-auth/auth/verify',
			method: 'POST',
			data
		})
	},

	/**
	 * 重置密码
	 */
	resetPassword: (data) => {
		return request({
			url: '/b-auth/auth/reset/password',
			method: 'POST',
			data
		})
	},
}